package com.b2b.bean;

/**
 * 用户登录Session
 */
@SuppressWarnings("serial")
public class Session implements java.io.Serializable
{
	private String sessionID = "";	// 会话代码
	private long userId = 0L;			// 用户代码
	private long memberId = 0L;			// 会员代码
	private String mobile = "";		// 手机号
	private long signonTime;		// 登陆时间
	private String source = "";		// 来源：0-网站、1-iPhone、2-Android、3-微信、4-H5、5-管理平台
	private String deviceID = "";	// 设备号
	private String ip = "";			// IP地址
	private String cookie = "";		// 用户浏览器cookie
	private double geoX = 0d;			// 经度
	private double geoY = 0d;			// 纬度
	
	@Override
	public String toString()
	{
		return String.format(
			"{sessionID : [%s], userID : [%s], memberID : [%s], mobile : [%s], signonTime : [%s], source : [%s], deviceID : [%s], ip : [%s], cookie : [%s], geoX : [%s], geoY : [%s]}", 
			sessionID, userId, memberId, mobile, signonTime, source, deviceID, ip, cookie, geoX, geoY
		);
	}

	public String getSessionID()
	{
		return sessionID;
	}

	public void setSessionID(String sessionID)
	{
		this.sessionID = sessionID;
	}

	public long getUserId()
	{
		return userId;
	}

	public void setUserId(long userId)
	{
		this.userId = userId;
	}

	public long getMemberId()
	{
		return memberId;
	}

	public void setMemberId(long memberId)
	{
		this.memberId = memberId;
	}

	public String getMobile()
	{
		return mobile;
	}

	public void setMobile(String mobile)
	{
		this.mobile = mobile;
	}

	public long getSignonTime()
	{
		return signonTime;
	}

	public void setSignonTime(long signonTime)
	{
		this.signonTime = signonTime;
	}

	public String getSource()
	{
		return source;
	}

	public void setSource(String source)
	{
		this.source = source;
	}

	public String getDeviceID()
	{
		return deviceID;
	}

	public void setDeviceID(String deviceID)
	{
		this.deviceID = deviceID;
	}

	public String getIp()
	{
		return ip;
	}

	public void setIp(String ip)
	{
		this.ip = ip;
	}

	public String getCookie()
	{
		return cookie;
	}

	public void setCookie(String cookie)
	{
		this.cookie = cookie;
	}

	public double getGeoX()
	{
		return geoX;
	}

	public void setGeoX(double geoX)
	{
		this.geoX = geoX;
	}

	public double getGeoY()
	{
		return geoY;
	}

	public void setGeoY(double geoY)
	{
		this.geoY = geoY;
	}
	
}